package com.wxf.book1_38;

public class Book92 {

	public static void main(String[] args) {
		long[] arr0 = new long[21];
		arr0[0] = 1;
		arr0[1] = 2;
		arr0[2] = arr0[0] + arr0[1];
		double temp = 0;
		for (int i = 1; i < arr0.length; i++) {
			if (i == 1) {
				arr0[i] = 2;
				System.out.print(" " + arr0[i]);
			} else {
				arr0[i] = arr0[i - 2] + arr0[i - 1];
				System.out.print(" " + arr0[i]);
			}
		}
		for (int j = 1; j < arr0.length; j++) {
			temp = temp + (double) arr0[j] / arr0[j - 1];
			System.out.print(" " + temp);
		}
		System.out.println();
		System.out.println(temp);
	}

}
